﻿using System;
using System.Collections.Generic;
using System.IdentityModel.Selectors;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using BackupManager.Configuration;

namespace BackupManager.Authentication
{
    public class CustomUserNamePasswordValidator : UserNamePasswordValidator
    {
        public override void Validate(string userName, string password)
        {
            if (!userName.Equals(ConfigManager.Instance.AuthenticationUserName) || !password.Equals(ConfigManager.Instance.AuthenticationPassword))
            {
                throw new FaultException("Invalid username / password combination!");
            }
        }
    }
}
